﻿using Xunit;

namespace dogd.Tests
{
	public class KeyFacts
	{
		public class TheIsValidProperty
		{
			[Fact]
			public void IsFalseForDefaultConstructedKey()
			{
				Assert.False(new Key().IsValid);
			}

			[Fact]
			public void IsTrueForSuppliedIDKey()
			{
				Assert.True(new Key(1).IsValid);
			}
		}

		public class TheValueProperty
		{
			[Fact]
			public void MatchesTheOriginalKeyValue()
			{
				int dbKeyValue = 1;
				var key = new Key(dbKeyValue);

				Assert.Equal(dbKeyValue, key.Value);
			}
		}
	}
}
